package dexter.aware.msg;

import dexter.core.host.HostAddress;
import dexter.net.msg.common.RequestParams;

public class StateParams implements RequestParams {

	private static final long serialVersionUID = -5919260270422988999L;
	
	private int[] state;
	private HostAddress host;
	
	/**
	 * Creates a state message with 3 state properties : CPU, MEM, and DISK
	 * @param state
	 */
	public StateParams(HostAddress host, int[] state) {
		this.host = host;
		this.state = state;
	}

	/**
	 * Returns the state content (CPU, MEM, and DISK)
	 * @return state
	 */
	public int[] getState() {
		return state;
	}

	public String toString() {
		return "State : CPU("+state[0]+"%), MEM("+state[1]+"%), DISK("+state[2]+"%)";
	}

	public HostAddress getHost() {
		return host;
	}

}